package com.sky.haikangdemo.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 海康摄像头相关参数
 */
@Data
public class ParkAccessTemporary {

    /**
     * 车牌号码
     */
    private String plate;


    /**
     * 拍摄照片地址
     */
    @Column(name = "image_addr")
    private String imageAddr;

    /**
     * 终端提交时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "do_time")
    private Date doTime;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 车牌类型
     */
    @Column(name = "plate_type")
    private String plateType;

    /**
     * 进场时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "into_time")
    private Date intoTime;

    /**
     * 出场时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "out_time")
    private Date outTime;

    /**
     * 停车场ID
     */
    @Column(name = "park_id")
    private String parkId;

    /**
     * 关联的订单号
     */
    @Id
    @Column(name = "order_id")
    private String orderId;

    /**
     * 订单状态 -3超时到达停车场，-2用户取消， -1超时付款取消，0 已下单，1已付押金，2已进场，3已离场（未支付完成），4历史异常订单，5已完成订单
     */
    @Column(name = "order_state")
    private Integer orderState;

    /**
     * 订单类型: 1本地实时，2平台预约
     */
    @Column(name = "order_type")
    private Integer orderType;

    /**
     * 订单应付金额
     */
    @Column(name = "total_payment")
    private String totalPayment;

    /**
     * 支付方式：1网络。2现金，3提前支付
     */
    @Column(name = "pay_type")
    private Integer payType;

    /**
     * 订单取消时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "cancel_time")
    private Date cancelTime;

    /**
     * 订单完成时间
     */
    @Column(name = "complete_time")
    private Date completeTime;

    /**
     * 车辆类型：0无牌，1特殊车辆，2固定车辆，5特别收费，4普通收费，3预约车辆
     */
    @Column(name = "car_type")
    private Integer carType;

    /**
     * 完成时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "finish_time")
    private Date finishTime;

    /**
     * 车位id
     */
    private String siteId;

    /**
     * 进场道闸
     */
    private String intoDevice;

    /**
     * 已付金额
     */
    private BigDecimal paid;

    /**
     * 出场道闸
     */
    private String outDevice;

    @Column(name="update_time")
    private Date updateTime;

    private  Integer whiteType;

    /**
     * 付款白名单   0不用  1需要
     */
    private Integer whitepay;


    /**
     * 白名单需付款金额
     */
    private String whiteprice;

    /**
     * 是否使用无感支付 (1:是，0：否)
     */
    @Column(name = "fast_payment")
    private Integer fastPayment;

    /**
     * 是否是工行无感支付用户(1:是, 0:否)
     */
    @Column(name = "no_feeling_payment")
    private Integer noFeelingPayment = 0;

    @Column(name = "discount_coupon")
    private Integer discountCoupon = 0;


}

